//
//  SelectSpecView.h
//  SelectSpec
//
//  Created by 吴欧 on 20/10/21.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SepecModel.h"
#import "HEGoodsDetailsModel.h"

typedef NS_ENUM(NSUInteger, SpecSelectType) {
    SpecSelectTypeAddCart, // 加入购物车
    SpecSelectTypeBuyNow   // 立即购买
};

typedef void(^SelectSpecViewBlock)(NSInteger skuid, NSString *price, NSInteger num, NSString *sepec);

@interface SelectSpecView : UIView

/**
 数据源模型
 */
@property (nonatomic, strong) NSArray<SepecModel *> *dataArr;

@property (nonatomic, strong) NSArray<compareSepecModel *> *comparedataArr;

@property (nonatomic, strong) HEGoodsModel *goods;

@property (nonatomic, copy) NSString *compeleteStr; // 选中或是未选择的规格

@property (nonatomic, assign) SpecSelectType type;

/**
 选择完成后回调
 */
@property (nonatomic, copy)SelectSpecViewBlock finishSelectedBlock;

/**
 未选择完成后回调
 */
@property (nonatomic, copy)SelectSpecViewBlock inCompleteBlock;

/**
 按钮点击事件
 */
@property (nonatomic, copy)SelectSpecViewBlock actionBtnBlock;


+ (SelectSpecView*)selectSpecViewWithdataArr:(NSArray<SepecModel *> *)dataArr;

/**
 显示
 */
- (void)show:(SpecSelectType)type;

/**
 隐藏
 */
- (void)hiddenView;



@end
